﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using iLangl.Model;
using iLangl.BusinessModel.Managers;
using iLangl.Customer.DNN;


namespace iLangl.Tests.InitialDataFixture
{
	[TestClass]
	public class PluginRegistrationTest
	{
		public static String iLanglLanguageWirePlugin = "B6C10D99-4E9A-4404-BEF5-B77C9EC7BE64";
		public static String iLanglTestCustomerPlugin = "74002E79-C356-41A9-AA72-CC4127FF3945";
		

		[TestMethod]
		public void DNNPluginRegistration()
		{

			PluginData plugin = new PluginData();
			plugin.ID = RegistrationManager.PluginId;
			plugin.Name = RegistrationManager.PluginName;
			plugin.Version = RegistrationManager.PluginVersion;
			plugin.Platform = "Microsoft .Net";
			plugin.IsTranslationProvider = false;

			PluginManager.Instance.RegisterPlugin(plugin);
		}


		[TestMethod]
		public void LanguageWirePluginRegistration()
		{

			PluginData plugin = new PluginData();
			plugin.ID = iLanglLanguageWirePlugin;
			plugin.Name = "iLangl LanguageWire Plugin";
			plugin.Version = "1";
			plugin.Platform = "Microsoft .Net";
			plugin.IsTranslationProvider = true;
			plugin.IsPushingEnabled = true;
			plugin.IsAsyncTransportSupported = true;
			PluginManager.Instance.RegisterPlugin(plugin);
		}



		[TestMethod]
		public void TestCustomerPluginRegistration()
		{

			PluginData plugin = new PluginData();
			plugin.ID = "74002E79-C356-41A9-AA72-CC4127FF3945";
			plugin.Name = "iLangl Test Customer Plugin";
			plugin.Version = "1";
			plugin.Platform = "Microsoft .Net";
			plugin.IsTranslationProvider = false;
			plugin.IsPushingEnabled = false;
			PluginManager.Instance.RegisterPlugin(plugin);
		}
	}
}
